<template>
    <van-dialog
      v-model:show="showDialog"
      title="标题"
      show-cancel-button
      @confirm="sureBtn"
      @cancel="cancelBtn"
    >
      <img
        width="100"
        src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg"
      />
    </van-dialog>
</template>

<script setup lang="ts">
const props = defineProps({
  showDialog: {
    type: Boolean,
    default: false,
  },
});

const { showDialog } = toRefs(props);

const emit = defineEmits();
function sureBtn() {
  emit("sureBtn", false);
}

function cancelBtn() {
  emit("cancelBtn", false);
}

defineExpose({
  sureBtn,
  cancelBtn,
});
</script>

<style>
</style>